﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/*
卫星
 */
public class Guard : MonoBehaviour {
	private Transform rotateCenter;//旋转中心
	private Vector3 rotateDir;//旋转方向
	private float rotateSpeed;//旋转速度

	public Sprite prefab_bady;

	private GuardGun guardGun;//枪口
	private Weapon weapon;//枪口的武器
	

	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		transform.RotateAround(rotateCenter.position, rotateDir, rotateSpeed*Time.deltaTime);
	}

	public void SetRotatePro(Transform rotateCenter, Vector3 rotateDir, float rotateSpeed){
		this.rotateCenter = rotateCenter;
		this.rotateDir = rotateDir;
		this.rotateSpeed = rotateSpeed;
	}

	public void SetWeaponById(int weaponId){

	}
}
